import request from '@/api/server.js'

export function getLeadsList(params) {
  return request({
    url: '/leads',
    method: 'get',
    params,
  })
}

export function saveLeads(data) {
  return request({
    url: '/leads',
    method: 'post',
    data,
  })
}

export function updateLeads(data) {
  return request({
    url: '/leads',
    method: 'put',
    data,
  })
}

export function deleteLeads(leadsId) {
  return request({
    url: `/leads/${leadsId}`,
    method: 'delete',
  })
}

export function updataOwnerUser(params) {
  return request({
    url: '/leads/owner',
    method: 'put',
    params,
  })
}
